@import "../../emoji/face.css";
@import "editormd/code.css";

main {
  position: relative;
  justify-content: initial;
}

.article {
  width: calc(100% - 200px);
  position: relative;
  transition: all 0.3s;

  .article_title {
    border-radius: 5px 5px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--card_bg);

    h2 {
      margin: 10px 0;
    }

    p {
      font-size: 14px;
      color: var(--font_1);

      span {
        margin-right: 10px;

        &
        :last-child {
          margin-right: 0;
        }

      }
    }

    > div {
      margin: 10px 0;

      i {
        font-size: 14px;
        margin-right: 5px;
        color: var(--active);

        &
        :first-child {
          color: var(--font_1);
        }

      }
    }
  }

  .article_content {
    margin-top: 1px;
    min-height: 200px;
    background-color: var(--card_bg);
    width: 100%;

    ol, li, ul {
      list-style: inherit;
    }

  }

  .article_bottom {

    display: none;
  }

  .prev_next_article {
    background-color: var(--card_bg);
    padding: 20px;
    border-radius: 0 0 5px 5px;

    .pn_content {
      border-top: 1px solid var(--bg);
      width: 100%;
      display: flex;
      padding-top: 5px;
      justify-content: space-between;

      a {
        color: var(--font_1);
      }

    }
  }

  .comment_submit {
    margin-top: 20px;
    min-height: 200px;
    background-color: var(--card_bg);
    padding: 20px 20px 10px 20px;

    .title {
      padding-bottom: 10px;
      margin-bottom: 10px;
      border-bottom: 1px solid var(--bg_darken);
      color: var(--font_1);
      position: relative;

      &
      ::after {
        display: block;
        content: '';
        width: 145px;
        height: 1px;
        background-color: var(--bg);
        position: absolute;
        bottom: 0;
        left: 0;
      }

    }

    .body {
      width: 100%;
      padding: 20px;
      height: 150px;
      background-color: var(--ele_bg);
      border-radius: 5px;
      position: relative;
      box-shadow: inset 2px 2px 6px rgb(0 0 0 / 8%);

      textarea {
        width: 100%;
        height: 100%;
        background-color: transparent;
        border: none;
        resize: none;
        color: var(--font_2);

        &
        :focus {
          border: none;
          outline: none;
        }

      }

      .face_icon {
        position: absolute;
        left: 15px;
        bottom: 10px;
      }

      > button {
        width: 100px;
        height: 40px;
        border-radius: 10px;
        background-color: var(--active);
        color: white;
        border: none;
        cursor: pointer;

        position: absolute;
        bottom: 20px;
        right: 20px;
      }

    }

    .footer {
      font-size: 14px;
      color: #555555;
      margin-top: 10px;

      p > span {
        color: #ff9800;
      }

    }
  }

  .comment_list {
    margin-top: 20px;

    ul {
      list-style: none;
    }

    > ul {

      > li {
        width: 100%;
        display: flex;
        margin-bottom: 20px;

        > .left {
          width: 70px;

          img {
            width: 50px;
            border-radius: 5px;
            transition: all 0.3s;

            &
            :hover {
              transform: scale(1.1);
            }

          }
        }

        > .right {
          width: calc(100% - 70px);
          background-color: var(--card_bg);
          border-radius: 5px;
          position: relative;
          box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
          padding: 10px 20px;

          &
          ::after {
            display: block;
            content: '';
            position: absolute;
            left: -20px;
            top: 15px;
            width: 0;
            height: 0;
            border: 10px solid transparent;
            border-right-color: var(--card_bg);
          }

          .comment_content {
            margin: 5px 0;

            img {
              margin-top: 5px;
              height: 120px;
              margin-right: 10px;
              border-radius: 5px;
              box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
            }

            img[alt="emoji"] {
              width: 22px;
              height: 22px;
              box-shadow: none;
            }

          }

          .comment_info {
            display: flex;
            justify-content: space-between;
            font-size: 14px;

            > div > span {
              cursor: pointer;
            }


          }

          .delete {
            color: var(--font_del);
            cursor: pointer;
          }

          .sub_comment_list {
            margin-top: 10px;
            display: none;

            > div {
              display: flex;
              margin-bottom: 10px;

              .left {
                width: 60px;

                img {
                  width: 40px;
                  border-radius: 5px;

                  transition: all 0.3s;

                  &
                  :hover {
                    transform: scale(1.1);
                  }

                }
              }

              .right {
                width: calc(100% - 60px);

                .sub_comment_content {
                  margin: 5px 0;
                }

                .sub_comment_info {
                  display: flex;
                  justify-content: space-between;
                  font-size: 14px;

                  > div > span {
                    cursor: pointer;
                  }

                }
              }
            }

            .sub_comment_textarea {
              position: relative;

              width: 100%;
              margin-bottom: 10px;

              > textarea {
                resize: none;
                width: 100%;
                padding: 10px;
                border: 1px solid var(--bg_darken);
                border-radius: 5px;
                color: var(--font_2);
                background-color: var(--bg);

                &
                :focus {
                  border: none;
                  outline: none;
                }

              }

              button {
                position: absolute;
                right: 20px;
                bottom: 20px;

                width: 80px;
                height: 30px;
                border-radius: 5px;
                background-color: var(--active);
                color: white;
                border: none;
                cursor: pointer;
              }

            }
          }
        }
      }
    }

    .editormd-html-preview {
      padding: 10px 0;

      p {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
      }

      p > img {
        height: 100px;
        border-radius: 5px;
        box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
        margin-right: 10px;
        cursor: zoom-in;
      }

      p > img[alt="emoji"] {
        width: 22px;
        height: 22px;
        margin: 0 2px;
        box-shadow: none;
      }

    }
  }

}

pre {
  position: relative;

  &
  :hover {

    .code-copy {
      opacity: 1;
    }

  }

  .code-copy {
    position: absolute;
    right: 10px;
    top: 10px;
    opacity: 0;
    cursor: pointer;
    transition: all 0.3s;
  }

}

.slide_or_actions {
  width: 180px;
  position: absolute;
  right: 110px;
  transition: all 0.3s;

  .slider_bar {

    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    background-color: var(--card_bg);
    overflow: hidden;

    .title {
      padding: 10px;
      display: flex;
      justify-content: center;
      align-items: center;

      span {
        margin-right: 10px;
      }

    }

    .body {
      background-color: var(--card_bg);
      padding: 10px 20px 20px 20px;

      p {
        width: 100%;
        height: 30px;
        line-height: 30px;
        cursor: pointer;
        transition: all 0.3s;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: var(--font_1);

        &
        :hover {
          background-color: rgba(0, 0, 0, 0.1);
        }

      }

      p[tagname='H1'] {
      }

      p[tagname='H2'] {
        padding-left: 10px;
      }

      p[tagname='H3'] {
        padding-left: 15px;
      }

      p[tagname='H4'] {
        padding-left: 20px;
      }

      p[tagname='H5'] {
        padding-left: 25px;
      }

      p[tagname='H6'] {
        padding-left: 30px;
      }

    }
  }

  .article_actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;

    .item {
      width: 60px;
      height: 60px;
      border-radius: 50%;
      background-color: var(--card_bg);
      margin-bottom: 20px;
      box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      font-size: 13px;

      i {
        font-size: 23px;
        cursor: pointer;
        color: var(--font_1);
      }

      i.show {
        color: var(--active);
      }

    }
  }

}


.slide_or_actions.show {
  width: 250px;

  &
  ~ .article {
    width: calc(100% - 270px);
  }

  .title {
    border-bottom: 1px solid var(--bg);
  }

  .body {
  }

}

.slide_or_actions.fixed {
  position: fixed;
  top: 80px;
}


.markdown-body.editormd-html-preview {

  ul {
    list-style: initial;

    li {
      line-height: 1.8rem;
      list-style: initial;
    }

  }

  p {
    margin-top: 5px;
    margin-bottom: 5px;
  }

}

.el-scrollbar__wrap {
  overflow-x: hidden !important;
}


